<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 5.4.0">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/16x16-next.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">


<link rel="stylesheet" href="/lib/font-awesome/css/all.min.css">

<script id="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"man-ah-qing.gitee.io","root":"/","scheme":"Gemini","version":"7.8.0","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":true,"show_result":true,"style":null},"back2top":{"enable":true,"sidebar":false,"scrollpercent":false},"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":true,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},"path":"search.xml"};
  </script>

  <meta name="description" content="在上一次任务的基础上，完成：1）增加管理员账号，菜单有：1-账户列表（列出所有账号信息）2-注册账户（添加一个新账号）3-注销账户（删除一个账号）2）普通用户，功能在上一次的基础上，增加转账功能    要求：1）使用函数完成以上操作，遵循单一职责原则。">
<meta property="og:type" content="article">
<meta property="og:title" content="java实验报告二">
<meta property="og:url" content="https://man-ah-qing.gitee.io/2021/12/09/java%E5%AE%9E%E9%AA%8C%E6%8A%A5%E5%91%8A%E4%BA%8C/index.html">
<meta property="og:site_name" content="徐庆的博客">
<meta property="og:description" content="在上一次任务的基础上，完成：1）增加管理员账号，菜单有：1-账户列表（列出所有账号信息）2-注册账户（添加一个新账号）3-注销账户（删除一个账号）2）普通用户，功能在上一次的基础上，增加转账功能    要求：1）使用函数完成以上操作，遵循单一职责原则。">
<meta property="og:locale" content="zh_CN">
<meta property="article:published_time" content="2021-12-09T02:55:14.000Z">
<meta property="article:modified_time" content="2021-12-12T04:52:07.060Z">
<meta property="article:author" content="啊庆">
<meta property="article:tag" content="java实验">
<meta name="twitter:card" content="summary">

<link rel="canonical" href="https://man-ah-qing.gitee.io/2021/12/09/java%E5%AE%9E%E9%AA%8C%E6%8A%A5%E5%91%8A%E4%BA%8C/">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : false,
    isPost : true,
    lang   : 'zh-CN'
  };
</script>

  <title>java实验报告二 | 徐庆的博客</title>
  






  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container use-motion">
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <h1 class="site-title">徐庆的博客</h1>
      <span class="logo-line-after"><i></i></span>
    </a>
      <p class="site-subtitle" itemprop="description">记录学习生活中的点点滴滴</p>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
        <i class="fa fa-search fa-fw fa-lg"></i>
    </div>
  </div>
</div>




<nav class="site-nav">
  <ul id="menu" class="main-menu menu">
        <li class="menu-item menu-item-home">

    <a href="/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a>

  </li>
        <li class="menu-item menu-item-about">

    <a href="/about/" rel="section"><i class="fa fa-user fa-fw"></i>关于</a>

  </li>
        <li class="menu-item menu-item-tags">

    <a href="/tags/" rel="section"><i class="fa fa-tags fa-fw"></i>标签<span class="badge">5</span></a>

  </li>
        <li class="menu-item menu-item-categories">

    <a href="/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类<span class="badge">4</span></a>

  </li>
        <li class="menu-item menu-item-archives">

    <a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档<span class="badge">15</span></a>

  </li>
      <li class="menu-item menu-item-search">
        <a role="button" class="popup-trigger"><i class="fa fa-search fa-fw"></i>搜索
        </a>
      </li>
  </ul>
</nav>



  <div class="search-pop-overlay">
    <div class="popup search-popup">
        <div class="search-header">
  <span class="search-icon">
    <i class="fa fa-search"></i>
  </span>
  <div class="search-input-container">
    <input autocomplete="off" autocapitalize="off"
           placeholder="搜索..." spellcheck="false"
           type="search" class="search-input">
  </div>
  <span class="popup-btn-close">
    <i class="fa fa-times-circle"></i>
  </span>
</div>
<div id="search-result">
  <div id="no-result">
    <i class="fa fa-spinner fa-pulse fa-5x fa-fw"></i>
  </div>
</div>

    </div>
  </div>

</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content post posts-expand">
            

    
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="https://man-ah-qing.gitee.io/2021/12/09/java%E5%AE%9E%E9%AA%8C%E6%8A%A5%E5%91%8A%E4%BA%8C/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/q.jpg">
      <meta itemprop="name" content="啊庆">
      <meta itemprop="description" content="一壶酌酒一壶愁，一时风流一时忧。一梦古今一梦休，一生一世长相守">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="徐庆的博客">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          java实验报告二
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>

              <time title="创建时间：2021-12-09 10:55:14" itemprop="dateCreated datePublished" datetime="2021-12-09T10:55:14+08:00">2021-12-09</time>
            </span>
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="far fa-calendar-check"></i>
                </span>
                <span class="post-meta-item-text">更新于</span>
                <time title="修改时间：2021-12-12 12:52:07" itemprop="dateModified" datetime="2021-12-12T12:52:07+08:00">2021-12-12</time>
              </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/java%E5%AE%9E%E9%AA%8C/" itemprop="url" rel="index"><span itemprop="name">java实验</span></a>
                </span>
            </span>

          
            <span class="post-meta-item" title="阅读次数" id="busuanzi_container_page_pv" style="display: none;">
              <span class="post-meta-item-icon">
                <i class="fa fa-eye"></i>
              </span>
              <span class="post-meta-item-text">阅读次数：</span>
              <span id="busuanzi_value_page_pv"></span>
            </span>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <p>在上一次任务的基础上，完成：<br>1）增加管理员账号，菜单有：<br>1-账户列表（列出所有账号信息）<br>2-注册账户（添加一个新账号）<br>3-注销账户（删除一个账号）<br>2）普通用户，功能在上一次的基础上，增加转账功能<br>    要求：<br>1）使用函数完成以上操作，遵循单一职责原则。</p>
<span id="more"></span>

<figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br><span class="line">139</span><br><span class="line">140</span><br><span class="line">141</span><br><span class="line">142</span><br><span class="line">143</span><br><span class="line">144</span><br><span class="line">145</span><br><span class="line">146</span><br><span class="line">147</span><br><span class="line">148</span><br><span class="line">149</span><br><span class="line">150</span><br><span class="line">151</span><br><span class="line">152</span><br><span class="line">153</span><br><span class="line">154</span><br><span class="line">155</span><br><span class="line">156</span><br><span class="line">157</span><br><span class="line">158</span><br><span class="line">159</span><br><span class="line">160</span><br><span class="line">161</span><br><span class="line">162</span><br><span class="line">163</span><br><span class="line">164</span><br><span class="line">165</span><br><span class="line">166</span><br><span class="line">167</span><br><span class="line">168</span><br><span class="line">169</span><br><span class="line">170</span><br><span class="line">171</span><br><span class="line">172</span><br><span class="line">173</span><br><span class="line">174</span><br><span class="line">175</span><br><span class="line">176</span><br><span class="line">177</span><br><span class="line">178</span><br><span class="line">179</span><br><span class="line">180</span><br><span class="line">181</span><br><span class="line">182</span><br><span class="line">183</span><br><span class="line">184</span><br><span class="line">185</span><br><span class="line">186</span><br><span class="line">187</span><br><span class="line">188</span><br><span class="line">189</span><br><span class="line">190</span><br><span class="line">191</span><br><span class="line">192</span><br><span class="line">193</span><br><span class="line">194</span><br><span class="line">195</span><br><span class="line">196</span><br><span class="line">197</span><br><span class="line">198</span><br><span class="line">199</span><br><span class="line">200</span><br><span class="line">201</span><br><span class="line">202</span><br><span class="line">203</span><br><span class="line">204</span><br><span class="line">205</span><br><span class="line">206</span><br><span class="line">207</span><br><span class="line">208</span><br><span class="line">209</span><br><span class="line">210</span><br><span class="line">211</span><br><span class="line">212</span><br><span class="line">213</span><br><span class="line">214</span><br><span class="line">215</span><br><span class="line">216</span><br><span class="line">217</span><br><span class="line">218</span><br><span class="line">219</span><br><span class="line">220</span><br><span class="line">221</span><br><span class="line">222</span><br><span class="line">223</span><br><span class="line">224</span><br><span class="line">225</span><br><span class="line">226</span><br><span class="line">227</span><br><span class="line">228</span><br><span class="line">229</span><br><span class="line">230</span><br><span class="line">231</span><br><span class="line">232</span><br><span class="line">233</span><br><span class="line">234</span><br><span class="line">235</span><br><span class="line">236</span><br><span class="line">237</span><br><span class="line">238</span><br><span class="line">239</span><br><span class="line">240</span><br><span class="line">241</span><br><span class="line">242</span><br><span class="line">243</span><br><span class="line">244</span><br><span class="line">245</span><br><span class="line">246</span><br><span class="line">247</span><br><span class="line">248</span><br><span class="line">249</span><br><span class="line">250</span><br><span class="line">251</span><br><span class="line">252</span><br><span class="line">253</span><br><span class="line">254</span><br><span class="line">255</span><br><span class="line">256</span><br><span class="line">257</span><br><span class="line">258</span><br><span class="line">259</span><br><span class="line">260</span><br><span class="line">261</span><br><span class="line">262</span><br><span class="line">263</span><br><span class="line">264</span><br><span class="line">265</span><br><span class="line">266</span><br><span class="line">267</span><br><span class="line">268</span><br><span class="line">269</span><br><span class="line">270</span><br><span class="line">271</span><br><span class="line">272</span><br><span class="line">273</span><br><span class="line">274</span><br><span class="line">275</span><br><span class="line">276</span><br><span class="line">277</span><br><span class="line">278</span><br><span class="line">279</span><br><span class="line">280</span><br><span class="line">281</span><br><span class="line">282</span><br><span class="line">283</span><br><span class="line">284</span><br><span class="line">285</span><br><span class="line">286</span><br><span class="line">287</span><br><span class="line">288</span><br><span class="line">289</span><br><span class="line">290</span><br><span class="line">291</span><br><span class="line">292</span><br><span class="line">293</span><br><span class="line">294</span><br><span class="line">295</span><br><span class="line">296</span><br><span class="line">297</span><br><span class="line">298</span><br><span class="line">299</span><br><span class="line">300</span><br><span class="line">301</span><br><span class="line">302</span><br><span class="line">303</span><br><span class="line">304</span><br><span class="line">305</span><br><span class="line">306</span><br><span class="line">307</span><br><span class="line">308</span><br><span class="line">309</span><br><span class="line">310</span><br><span class="line">311</span><br><span class="line">312</span><br><span class="line">313</span><br><span class="line">314</span><br><span class="line">315</span><br><span class="line">316</span><br><span class="line">317</span><br><span class="line">318</span><br><span class="line">319</span><br><span class="line">320</span><br><span class="line">321</span><br><span class="line">322</span><br><span class="line">323</span><br><span class="line">324</span><br><span class="line">325</span><br><span class="line">326</span><br><span class="line">327</span><br><span class="line">328</span><br><span class="line">329</span><br><span class="line">330</span><br><span class="line">331</span><br><span class="line">332</span><br><span class="line">333</span><br><span class="line">334</span><br><span class="line">335</span><br><span class="line">336</span><br><span class="line">337</span><br><span class="line">338</span><br><span class="line">339</span><br><span class="line">340</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">import</span> java.util.Scanner;</span><br><span class="line"></span><br><span class="line"><span class="keyword">public</span> <span class="class"><span class="keyword">class</span> <span class="title">ATM</span> </span>&#123;</span><br><span class="line">    <span class="function"><span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title">main</span><span class="params">(String[] args)</span> </span>&#123;</span><br><span class="line">        <span class="comment">//初始化基本账号信息</span></span><br><span class="line">        String[] accountIds = <span class="keyword">new</span> String[<span class="number">100</span>];</span><br><span class="line">        String[] passwords = <span class="keyword">new</span> String[<span class="number">100</span>];</span><br><span class="line">        <span class="keyword">double</span>[] balances = <span class="keyword">new</span> <span class="keyword">double</span>[<span class="number">100</span>];</span><br><span class="line">        <span class="keyword">boolean</span>[] isAdmins = <span class="keyword">new</span> <span class="keyword">boolean</span>[<span class="number">100</span>];</span><br><span class="line"></span><br><span class="line">        accountIds[<span class="number">0</span>] = <span class="string">&quot;a001&quot;</span>;</span><br><span class="line">        passwords[<span class="number">0</span>] = <span class="string">&quot;001&quot;</span>;</span><br><span class="line">        balances[<span class="number">0</span>] = <span class="number">0</span>;</span><br><span class="line">        isAdmins[<span class="number">0</span>] = <span class="keyword">true</span>;</span><br><span class="line"></span><br><span class="line">        login(accountIds, passwords, balances, isAdmins);</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="function"><span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title">login</span><span class="params">(String[] accountIds, String[] passwords, <span class="keyword">double</span>[] balances, <span class="keyword">boolean</span>[] isAdmins)</span> </span>&#123;</span><br><span class="line">        display(<span class="string">&quot;欢迎使用银行业务系统2.0，请选择您的操作：1-登录，2-退出系统&quot;</span>);</span><br><span class="line">        Scanner scanner = <span class="keyword">new</span> Scanner(System.in);</span><br><span class="line">        String operation = scanner.next();</span><br><span class="line"></span><br><span class="line">        <span class="keyword">if</span> (<span class="string">&quot;2&quot;</span>.equals(operation)) &#123;</span><br><span class="line">            display(<span class="string">&quot;欢迎下次光临&quot;</span>);</span><br><span class="line">            System.exit(-<span class="number">1</span>);</span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">        <span class="comment">//登录开始，判断用户名是否存在</span></span><br><span class="line">        <span class="keyword">int</span> accountIndex = validateUserName(accountIds);</span><br><span class="line"></span><br><span class="line">        <span class="comment">//判断密码是否正确</span></span><br><span class="line">        validatePassword(passwords, accountIndex);</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">        <span class="comment">//判断是否管理员账号</span></span><br><span class="line">        <span class="keyword">boolean</span> isAdmin = isAdmin(isAdmins, accountIndex);</span><br><span class="line"></span><br><span class="line">        <span class="comment">//登录成功，开始业务操作</span></span><br><span class="line">        <span class="keyword">if</span> (isAdmin) &#123;</span><br><span class="line">            handleAdmin(accountIds, passwords, balances, isAdmins, accountIndex);</span><br><span class="line">        &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">            handleUser(accountIds, passwords, balances, isAdmins, accountIndex);</span><br><span class="line">        &#125;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="function"><span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">boolean</span> <span class="title">isAdmin</span><span class="params">(<span class="keyword">boolean</span>[] isAdmins, <span class="keyword">int</span> accountIndex)</span> </span>&#123;</span><br><span class="line">        <span class="keyword">return</span> isAdmins[accountIndex];</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="comment">/**</span></span><br><span class="line"><span class="comment">     * 处理普通用户操作</span></span><br><span class="line"><span class="comment">     *</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param</span> balances     余额数组</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param</span> accountIndex 账号位置</span></span><br><span class="line"><span class="comment">     */</span></span><br><span class="line">    <span class="function"><span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title">handleUser</span><span class="params">(String[] accountIds, String[] passwords, <span class="keyword">double</span>[] balances, <span class="keyword">boolean</span>[] isAdmins, <span class="keyword">int</span> accountIndex)</span> </span>&#123;</span><br><span class="line">        welcome(accountIds[accountIndex]);</span><br><span class="line">        display(<span class="string">&quot;请选择您的操作，1-存款，2-取款，3-查询余额，4-转账，5-重新登录&quot;</span>);</span><br><span class="line"></span><br><span class="line">        Scanner scanner = <span class="keyword">new</span> Scanner(System.in);</span><br><span class="line">        String operation = scanner.next();</span><br><span class="line">        <span class="keyword">while</span> (<span class="keyword">true</span>) &#123;</span><br><span class="line">            <span class="keyword">if</span> (<span class="string">&quot;1&quot;</span>.equals(operation)) &#123;</span><br><span class="line">                deposit(balances, accountIndex);</span><br><span class="line">            &#125; <span class="keyword">else</span> <span class="keyword">if</span> (<span class="string">&quot;2&quot;</span>.equals(operation)) &#123;</span><br><span class="line">                withdraw(balances, accountIndex);</span><br><span class="line">            &#125; <span class="keyword">else</span> <span class="keyword">if</span> (<span class="string">&quot;3&quot;</span>.equals(operation)) &#123;</span><br><span class="line">                query(balances, accountIndex);</span><br><span class="line">            &#125; <span class="keyword">else</span> <span class="keyword">if</span> (<span class="string">&quot;4&quot;</span>.equals(operation)) &#123;</span><br><span class="line">                transfer(accountIds, balances, accountIndex);</span><br><span class="line">            &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">                login(accountIds, passwords, balances, isAdmins);</span><br><span class="line">            &#125;</span><br><span class="line">            display(<span class="string">&quot;请选择您的操作，1-存款，2-取款，3-查询余额，4-转账，5-重新登录&quot;</span>);</span><br><span class="line">            operation = scanner.next();</span><br><span class="line">        &#125;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="comment">/**</span></span><br><span class="line"><span class="comment">     * 处理管理员操作</span></span><br><span class="line"><span class="comment">     *</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param</span> balances     余额数组</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param</span> accountIndex 账号位置</span></span><br><span class="line"><span class="comment">     */</span></span><br><span class="line">    <span class="function"><span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title">handleAdmin</span><span class="params">(String[] accountIds, String[] passwords, <span class="keyword">double</span>[] balances, <span class="keyword">boolean</span>[] isAdmins, <span class="keyword">int</span> accountIndex)</span> </span>&#123;</span><br><span class="line">        welcome(accountIds[accountIndex]);</span><br><span class="line">        display(<span class="string">&quot;请选择您的操作，1-注册新账号，2-注销新账号，3-查询所有账户信息，4-重新登录&quot;</span>);</span><br><span class="line"></span><br><span class="line">        Scanner scanner = <span class="keyword">new</span> Scanner(System.in);</span><br><span class="line">        String operation = scanner.next();</span><br><span class="line">        <span class="keyword">while</span> (<span class="keyword">true</span>) &#123;</span><br><span class="line">            <span class="keyword">if</span> (<span class="string">&quot;1&quot;</span>.equals(operation)) &#123;</span><br><span class="line">                register(accountIds, passwords, balances, isAdmins);</span><br><span class="line">            &#125; <span class="keyword">else</span> <span class="keyword">if</span> (<span class="string">&quot;2&quot;</span>.equals(operation)) &#123;</span><br><span class="line">                unregister(accountIds, passwords, balances, isAdmins);</span><br><span class="line">            &#125; <span class="keyword">else</span> <span class="keyword">if</span> (<span class="string">&quot;3&quot;</span>.equals(operation)) &#123;</span><br><span class="line">                queryAll(accountIds, passwords, balances, isAdmins);</span><br><span class="line">            &#125; <span class="keyword">else</span> <span class="keyword">if</span> (<span class="string">&quot;4&quot;</span>.equals(operation)) &#123;</span><br><span class="line">                login(accountIds, passwords, balances, isAdmins);</span><br><span class="line">            &#125;</span><br><span class="line">            display(<span class="string">&quot;请选择您的操作，1-注册新账号，2-注销新账号，3-查询所有账户信息，4-重新登录&quot;</span>);</span><br><span class="line">            operation = scanner.next();</span><br><span class="line">        &#125;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="function"><span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title">queryAll</span><span class="params">(String[] accountIds, String[] passwords, <span class="keyword">double</span>[] balances, <span class="keyword">boolean</span>[] isAdmins)</span> </span>&#123;</span><br><span class="line">        <span class="keyword">for</span> (<span class="keyword">int</span> i = <span class="number">0</span>; i &lt; accountIds.length; i++) &#123;</span><br><span class="line">            <span class="keyword">if</span> (accountIds[i] == <span class="keyword">null</span>) &#123;</span><br><span class="line">                <span class="keyword">continue</span>;</span><br><span class="line">            &#125;</span><br><span class="line">            String info = (i + <span class="number">1</span>) + <span class="string">&quot;. 账户名：&quot;</span> + accountIds[i]</span><br><span class="line">                    + <span class="string">&quot;, 密码：&quot;</span> + passwords[i] + <span class="string">&quot;, 余额&quot;</span></span><br><span class="line">                    + balances[i] + <span class="string">&quot;, 身份：&quot;</span> + (isAdmins[i] ? <span class="string">&quot;管理员&quot;</span> : <span class="string">&quot;普通用户&quot;</span>);</span><br><span class="line">            System.out.println(info);</span><br><span class="line">        &#125;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="function"><span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title">unregister</span><span class="params">(String[] accountIds, String[] passwords, <span class="keyword">double</span>[] balances, <span class="keyword">boolean</span>[] isAdmins)</span> </span>&#123;</span><br><span class="line">        display(<span class="string">&quot;请输入需要注销账号名：&quot;</span>);</span><br><span class="line">        Scanner scanner = <span class="keyword">new</span> Scanner(System.in);</span><br><span class="line">        String accountId = scanner.next();</span><br><span class="line">        <span class="keyword">int</span> accountIndex;</span><br><span class="line">        <span class="keyword">while</span> (<span class="keyword">true</span>) &#123;</span><br><span class="line">            String info = <span class="keyword">null</span>;</span><br><span class="line">            accountIndex = getAccountIndex(accountIds, accountId);</span><br><span class="line">            <span class="keyword">if</span> (accountIndex == -<span class="number">1</span>) &#123;</span><br><span class="line">                info = <span class="string">&quot;此账号不存在&quot;</span>;</span><br><span class="line">            &#125;</span><br><span class="line">            <span class="keyword">if</span> (isAdmins[accountIndex]) &#123;</span><br><span class="line">                info = <span class="string">&quot;此账号是管理员账户，无法注销&quot;</span>;</span><br><span class="line">            &#125;</span><br><span class="line"></span><br><span class="line">            <span class="keyword">if</span> (info != <span class="keyword">null</span>) &#123;</span><br><span class="line">                display(info + <span class="string">&quot;，请重新输入：&quot;</span>);</span><br><span class="line">                accountId = scanner.next();</span><br><span class="line">            &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">                <span class="keyword">break</span>;</span><br><span class="line">            &#125;</span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">        accountIds[accountIndex] = <span class="keyword">null</span>;</span><br><span class="line">        passwords[accountIndex] = <span class="keyword">null</span>;</span><br><span class="line">        balances[accountIndex] = <span class="number">0.0</span>;</span><br><span class="line">        isAdmins[accountIndex] = <span class="keyword">false</span>;</span><br><span class="line"></span><br><span class="line">        display(<span class="string">&quot;账号注销成功！&quot;</span>);</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="function"><span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title">register</span><span class="params">(String[] accountIds, String[] passwords, <span class="keyword">double</span>[] balances, <span class="keyword">boolean</span>[] isAdmins)</span> </span>&#123;</span><br><span class="line">        <span class="comment">//检测账号是否已经满了</span></span><br><span class="line">        <span class="keyword">int</span> pos = findEmptyPosition(accountIds);</span><br><span class="line">        <span class="keyword">if</span> (pos == accountIds.length) &#123;</span><br><span class="line">            display(<span class="string">&quot;账号已满，无法注册！&quot;</span>);</span><br><span class="line">            <span class="keyword">return</span>;</span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">        display(<span class="string">&quot;请输入新账号名：&quot;</span>);</span><br><span class="line">        Scanner scanner = <span class="keyword">new</span> Scanner(System.in);</span><br><span class="line">        String accountId = scanner.next();</span><br><span class="line">        <span class="keyword">while</span> (getAccountIndex(accountIds, accountId) != -<span class="number">1</span>) &#123;</span><br><span class="line">            display(<span class="string">&quot;此账号已经存在，请重新输入：&quot;</span>);</span><br><span class="line">            accountId = scanner.next();</span><br><span class="line">        &#125;</span><br><span class="line">        accountIds[pos] = accountId;</span><br><span class="line"></span><br><span class="line">        display(<span class="string">&quot;请输入该账号密码：&quot;</span>);</span><br><span class="line">        passwords[pos] = scanner.next();</span><br><span class="line"></span><br><span class="line">        balances[pos] = <span class="number">0</span>;</span><br><span class="line">        isAdmins[pos] = <span class="keyword">false</span>;</span><br><span class="line">        display(<span class="string">&quot;账号注册成功！&quot;</span>);</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="comment">/**</span></span><br><span class="line"><span class="comment">     * 转账操作</span></span><br><span class="line"><span class="comment">     *</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param</span> accountIds   账号数组</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param</span> balances     余额数组</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param</span> accountIndex 账号位置</span></span><br><span class="line"><span class="comment">     */</span></span><br><span class="line">    <span class="function"><span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title">transfer</span><span class="params">(String[] accountIds, <span class="keyword">double</span>[] balances, <span class="keyword">int</span> accountIndex)</span> </span>&#123;</span><br><span class="line">        <span class="comment">//获取目标账号</span></span><br><span class="line">        <span class="keyword">int</span> targetIndex;</span><br><span class="line">        display(<span class="string">&quot;请输入目标账号：&quot;</span>);</span><br><span class="line">        Scanner scanner = <span class="keyword">new</span> Scanner(System.in);</span><br><span class="line">        String accountId = scanner.next();</span><br><span class="line">        <span class="keyword">while</span> (getAccountIndex(accountIds, accountId) == -<span class="number">1</span>) &#123;</span><br><span class="line">            display(<span class="string">&quot;用户名不存在，请重新输入账号：&quot;</span>);</span><br><span class="line">            accountId = scanner.next();</span><br><span class="line">        &#125;</span><br><span class="line">        targetIndex = getAccountIndex(accountIds, accountId);</span><br><span class="line"></span><br><span class="line">        <span class="comment">//获取输入金额</span></span><br><span class="line">        display(<span class="string">&quot;请输入转账金额：&quot;</span>);</span><br><span class="line">        <span class="keyword">double</span> money = scanner.nextDouble();</span><br><span class="line">        <span class="keyword">while</span> (money &gt; balances[accountIndex]) &#123;</span><br><span class="line">            display(<span class="string">&quot;账户余额不足，请重新输入转账金额：&quot;</span>);</span><br><span class="line">            money = scanner.nextDouble();</span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">        <span class="comment">//开始转账</span></span><br><span class="line">        balances[accountIndex] -= money;</span><br><span class="line">        balances[targetIndex] += money;</span><br><span class="line">        display(<span class="string">&quot;转账成功！&quot;</span>);</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="comment">/**</span></span><br><span class="line"><span class="comment">     * 用来方便信息显示</span></span><br><span class="line"><span class="comment">     *</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param</span> info 需要显示的信息</span></span><br><span class="line"><span class="comment">     */</span></span><br><span class="line">    <span class="function"><span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title">display</span><span class="params">(String info)</span> </span>&#123;</span><br><span class="line">        System.out.println(info);</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="comment">/**</span></span><br><span class="line"><span class="comment">     * 用来显示欢迎信息</span></span><br><span class="line"><span class="comment">     *</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param</span> accountId 需要显示的信息</span></span><br><span class="line"><span class="comment">     */</span></span><br><span class="line">    <span class="function"><span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title">welcome</span><span class="params">(String accountId)</span> </span>&#123;</span><br><span class="line">        display(<span class="string">&quot;您好，&quot;</span> + accountId + <span class="string">&quot;, 您已经登录成功！&quot;</span>);</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="comment">/**</span></span><br><span class="line"><span class="comment">     * 显示账号余额信息</span></span><br><span class="line"><span class="comment">     *</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param</span> balances     余额数组</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param</span> accountIndex 账号位置</span></span><br><span class="line"><span class="comment">     */</span></span><br><span class="line">    <span class="function"><span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title">query</span><span class="params">(<span class="keyword">double</span>[] balances, <span class="keyword">int</span> accountIndex)</span> </span>&#123;</span><br><span class="line">        display(<span class="string">&quot;您的余额为：&quot;</span> + balances[accountIndex]);</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="comment">/**</span></span><br><span class="line"><span class="comment">     * 取款操作</span></span><br><span class="line"><span class="comment">     *</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param</span> balances     余额数组</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param</span> accountIndex 账号位置</span></span><br><span class="line"><span class="comment">     */</span></span><br><span class="line">    <span class="function"><span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title">withdraw</span><span class="params">(<span class="keyword">double</span>[] balances, <span class="keyword">int</span> accountIndex)</span> </span>&#123;</span><br><span class="line">        display(<span class="string">&quot;请输入需要取出的金额:&quot;</span>);</span><br><span class="line">        Scanner scanner = <span class="keyword">new</span> Scanner(System.in);</span><br><span class="line">        <span class="keyword">double</span> amount = scanner.nextDouble();</span><br><span class="line">        <span class="keyword">while</span> (amount &gt; balances[accountIndex]) &#123;</span><br><span class="line">            display(<span class="string">&quot;超出额度，请重新输入需要取出的金额:&quot;</span>);</span><br><span class="line">            amount = scanner.nextDouble();</span><br><span class="line">        &#125;</span><br><span class="line">        balances[accountIndex] -= amount;</span><br><span class="line">        display(<span class="string">&quot;取款成功&quot;</span>);</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="comment">/**</span></span><br><span class="line"><span class="comment">     * 存款操作</span></span><br><span class="line"><span class="comment">     *</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param</span> balances     余额数组</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param</span> accountIndex 账号位置</span></span><br><span class="line"><span class="comment">     */</span></span><br><span class="line">    <span class="function"><span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title">deposit</span><span class="params">(<span class="keyword">double</span>[] balances, <span class="keyword">int</span> accountIndex)</span> </span>&#123;</span><br><span class="line">        display(<span class="string">&quot;请输入需要存入的金额:&quot;</span>);</span><br><span class="line">        <span class="keyword">double</span> amount = <span class="keyword">new</span> Scanner(System.in).nextDouble();</span><br><span class="line">        balances[accountIndex] += amount;</span><br><span class="line">        display(<span class="string">&quot;存款成功&quot;</span>);</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="comment">/**</span></span><br><span class="line"><span class="comment">     * 获取账号位置</span></span><br><span class="line"><span class="comment">     *</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param</span> accountIds 账号数组</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param</span> accountId  用户输入的账号</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@return</span> 账号位置</span></span><br><span class="line"><span class="comment">     */</span></span><br><span class="line">    <span class="function"><span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">int</span> <span class="title">getAccountIndex</span><span class="params">(String[] accountIds, String accountId)</span> </span>&#123;</span><br><span class="line">        <span class="keyword">int</span> accountIndex = -<span class="number">1</span>;</span><br><span class="line">        <span class="keyword">for</span> (<span class="keyword">int</span> i = <span class="number">0</span>; i &lt; accountIds.length; i++) &#123;</span><br><span class="line">            <span class="keyword">if</span> (accountId.equals(accountIds[i])) &#123;</span><br><span class="line">                accountIndex = i;</span><br><span class="line">            &#125;</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="keyword">return</span> accountIndex;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="comment">/**</span></span><br><span class="line"><span class="comment">     * 获取有效账号数量</span></span><br><span class="line"><span class="comment">     *</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param</span> accountIds 账号数组</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@return</span> 有效账号数量</span></span><br><span class="line"><span class="comment">     */</span></span><br><span class="line">    <span class="function"><span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">int</span> <span class="title">findEmptyPosition</span><span class="params">(String[] accountIds)</span> </span>&#123;</span><br><span class="line">        <span class="keyword">for</span> (<span class="keyword">int</span> i = <span class="number">0</span>; i &lt; accountIds.length; i++) &#123;</span><br><span class="line">            <span class="keyword">if</span> (accountIds[i] == <span class="keyword">null</span>) &#123;</span><br><span class="line">                <span class="keyword">return</span> i;</span><br><span class="line">            &#125;</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="keyword">return</span> -<span class="number">1</span>;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">    <span class="comment">/**</span></span><br><span class="line"><span class="comment">     * 验证账号是否存在</span></span><br><span class="line"><span class="comment">     *</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param</span> accountIds 传入的账号数组</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@return</span> 返回账号所在位置，-1表示不存在</span></span><br><span class="line"><span class="comment">     */</span></span><br><span class="line">    <span class="function"><span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">int</span> <span class="title">validateUserName</span><span class="params">(String[] accountIds)</span> </span>&#123;</span><br><span class="line">        display(<span class="string">&quot;请输入您的账号：&quot;</span>);</span><br><span class="line">        Scanner scanner = <span class="keyword">new</span> Scanner(System.in);</span><br><span class="line">        String accountId;</span><br><span class="line">        <span class="keyword">int</span> accountIndex;</span><br><span class="line">        <span class="keyword">while</span> (<span class="keyword">true</span>) &#123;</span><br><span class="line">            accountId = scanner.next();</span><br><span class="line">            accountIndex = getAccountIndex(accountIds, accountId);</span><br><span class="line">            <span class="keyword">if</span> (accountIndex != -<span class="number">1</span>) &#123;</span><br><span class="line">                <span class="keyword">break</span>;</span><br><span class="line">            &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">                display(<span class="string">&quot;用户名不存在，请重新输入账号：&quot;</span>);</span><br><span class="line">            &#125;</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="keyword">return</span> accountIndex;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="comment">/**</span></span><br><span class="line"><span class="comment">     * 验证密码是否正确</span></span><br><span class="line"><span class="comment">     *</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param</span> passwords    密码数组</span></span><br><span class="line"><span class="comment">     * <span class="doctag">@param</span> accountIndex 账号位置</span></span><br><span class="line"><span class="comment">     */</span></span><br><span class="line">    <span class="function"><span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title">validatePassword</span><span class="params">(String[] passwords, <span class="keyword">int</span> accountIndex)</span> </span>&#123;</span><br><span class="line">        Scanner scanner = <span class="keyword">new</span> Scanner(System.in);</span><br><span class="line">        System.out.println(<span class="string">&quot;请输入您的密码：&quot;</span>);</span><br><span class="line">        String password = scanner.next();</span><br><span class="line"></span><br><span class="line">        <span class="keyword">while</span> (!password.equals(passwords[accountIndex])) &#123;</span><br><span class="line">            display(<span class="string">&quot;密码不正确，请重新输入密码：&quot;</span>);</span><br><span class="line">            password = scanner.next();</span><br><span class="line">        &#125;</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br></pre></td></tr></table></figure>


    </div>

    
    
    

      <footer class="post-footer">
          <div class="post-tags">
              <a href="/tags/java%E5%AE%9E%E9%AA%8C/" rel="tag"># java实验</a>
          </div>

        


        
    <div class="post-nav">
      <div class="post-nav-item">
    <a href="/2021/12/09/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84%E5%AE%9E%E9%AA%8C%E4%B8%89/" rel="prev" title="数据结构实验三">
      <i class="fa fa-chevron-left"></i> 数据结构实验三
    </a></div>
      <div class="post-nav-item">
    <a href="/2021/12/09/java%E6%9C%9F%E4%B8%AD%E8%80%83%E8%AF%95%E9%A2%98%E4%B8%80/" rel="next" title="java期中考试题一">
      java期中考试题一 <i class="fa fa-chevron-right"></i>
    </a></div>
    </div>
      </footer>
    
  </article>
  
  
  



          </div>
          

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="啊庆"
      src="/images/q.jpg">
  <p class="site-author-name" itemprop="name">啊庆</p>
  <div class="site-description" itemprop="description">一壶酌酒一壶愁，一时风流一时忧。一梦古今一梦休，一生一世长相守</div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/archives/">
        
          <span class="site-state-item-count">15</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
            <a href="/categories/">
          
        <span class="site-state-item-count">4</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
            <a href="/tags/">
          
        <span class="site-state-item-count">5</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>



      </div>

    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

        

<div class="copyright">
  
  &copy; 
  <span itemprop="copyrightYear">2022</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">xc</span>
</div>

        
<div class="busuanzi-count">
  <script async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
    <span class="post-meta-item" id="busuanzi_container_site_uv" style="display: none;">
      <span class="post-meta-item-icon">
        <i class="fa fa-user"></i>
      </span>
      <span class="site-uv" title="总访客量">
        <span id="busuanzi_value_site_uv"></span>
      </span>
    </span>
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item" id="busuanzi_container_site_pv" style="display: none;">
      <span class="post-meta-item-icon">
        <i class="fa fa-eye"></i>
      </span>
      <span class="site-pv" title="总访问量">
        <span id="busuanzi_value_site_pv"></span>
      </span>
    </span>
</div>








      </div>
    </footer>
  </div>

  
  <script src="/lib/anime.min.js"></script>
  <script src="/lib/velocity/velocity.min.js"></script>
  <script src="/lib/velocity/velocity.ui.min.js"></script>

<script src="/js/utils.js"></script>

<script src="/js/motion.js"></script>


<script src="/js/schemes/pisces.js"></script>


<script src="/js/next-boot.js"></script>




  




  
<script src="/js/local-search.js"></script>













  

  

</body>
</html>
